using System;

namespace Work.API.Dtos.DrugManagement
{
    /// <summary>
    /// 未打单处方明细DTO（用于查看检药单模块 - 未打单列表）
    /// 显示已支付但未创建检药单的处方明细
    /// </summary>
    public class UnbilledPrescriptionDto
    {
        /// <summary>
        /// 处方明细ID
        /// </summary>
        public int PrescriptionItemId { get; set; }

        /// <summary>
        /// 预约编号
        /// </summary>
        public int AppointmentId { get; set; }

        /// <summary>
        /// 患者ID
        /// </summary>
        public int PatientId { get; set; }

        /// <summary>
        /// 挂号编号
        /// </summary>
        public string? RegistrationNum { get; set; }

        /// <summary>
        /// 患者姓名
        /// </summary>
        public string? PatientName { get; set; }

        /// <summary>
        /// 患者性别
        /// </summary>
        public bool? Gender { get; set; }

        /// <summary>
        /// 性别文本
        /// </summary>
        public string? GenderText => Gender.HasValue ? (Gender.Value ? "男" : "女") : null;

        /// <summary>
        /// 患者年龄
        /// </summary>
        public int? Age { get; set; }

        /// <summary>
        /// 患者身份证号
        /// </summary>
        public string? IdCard { get; set; }

        /// <summary>
        /// 卡号
        /// </summary>
        public string? CardNumber { get; set; }

        /// <summary>
        /// 药品名称（来自处方明细）
        /// </summary>
        public string? MedicineName { get; set; }

        /// <summary>
        /// 药品ID（如果药品名称匹配到药品表中的药品）
        /// </summary>
        public int? DrugId { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        public decimal TotalAmount { get; set; }

        /// <summary>
        /// 开药时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 开药医生
        /// </summary>
        public string? CreateBy { get; set; }
    }
}




